
import android.annotation.SuppressLint;
import android.app.Activity;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;


import com.alipay.sdk.app.PayTask;

import java.util.Map;

import javax.xml.transform.Result;

import yja.gzw.app.R;
import yja.gzw.app.activity.FabusanActivity;


public class Zhifu {
    public static Handler mHandler = new Handler() {
        public void handleMessage(Message msg) {
            Log.e("支付结果",msg.toString());


        }





    };


    public static void zhifujieu(String info, Activity DemoActivity){
        final String orderInfo = info;   // 订单信息



        Runnable payRunnable = new Runnable() {
            @Override
            public void run() {
                PayTask alipay = new PayTask(DemoActivity);
                Map<String,String> result = alipay.payV2(orderInfo,true);
                Message msg = new Message();
                msg.what = 3;
                msg.obj = result;
                mHandler.sendMessage(msg);

            }
        };

        Thread payThread = new Thread(payRunnable);
        payThread.start();

    }

}
